package com.feng.chat.pojo;

import io.gitee.zerowsh.actable.annotation.AcColumn;
import io.gitee.zerowsh.actable.annotation.AcTable;
import io.gitee.zerowsh.actable.emnus.ColumnTypeEnums;

import java.time.LocalTime;

@AcTable(name = "article_annex", comment = "笔记附件信息表")
public class ArticleAnnex {
    @AcColumn(name = "id", comment = "文件ID", type = ColumnTypeEnums.BIGINT, length = 20, isAutoIncrement = true, isKey = true)
    private Integer id;

    @AcColumn(name = "user_id", comment = "上传文件的用户ID", type = ColumnTypeEnums.INT, isNull = false)
    private Integer user_id;

    @AcColumn(name = "article_id", comment = "笔记ID", type = ColumnTypeEnums.INT, isNull = false)
    private Integer article_id;

    @AcColumn(name = "drive", defaultValue = "1", comment = "文件驱动[1:local;2:cos;]", type = ColumnTypeEnums.INT, isNull = false)
    private Integer drive;

    @AcColumn(name = "suffix", defaultValue = "", comment = "文件后缀名", type = ColumnTypeEnums.VARCHAR, length = 10, isNull = false)
    private String suffix;

    @AcColumn(name = "size", defaultValue = "0", comment = "文件大小（单位字节）", type = ColumnTypeEnums.BIGINT, isNull = false)
    private Integer size;

    @AcColumn(name = "path", defaultValue = "", comment = "文件保存地址（相对地址）", type = ColumnTypeEnums.VARCHAR, length = 500, isNull = false)
    private String path;

    @AcColumn(name = "original_name", defaultValue = "", comment = "原文件名", type = ColumnTypeEnums.VARCHAR, length = 100, isNull = false)
    private String original_name;

    @AcColumn(name = "status", defaultValue = "1", comment = "附件状态[1:正常;2:已删除]", type = ColumnTypeEnums.TINYINT, isNull = false)
    private Integer status;

    @AcColumn(name = "created_at", comment = "创建时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime createdAt;

    @AcColumn(name = "updated_at", comment = "更新时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime updatedAt;

    @AcColumn(name = "deleted_at", comment = "删除时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime deleted_at;
}
